package com.huiying.config;

import com.huiying.utils.LocalFileUtil;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class LocalFileConfig {

    @Value("${huiying.file.upload-base-dir}") // 从配置文件读取路径
    private String uploadBaseDir;

    @Bean
    public LocalFileUtil localFileUtil() {
        return new LocalFileUtil(uploadBaseDir);
    }
}